package com.example.sofa_module.sofa.fragments.pics;

import android.view.View;
import android.widget.ImageView;

import com.bw.ijk.widget.IjkView;
import com.example.baserecyclerview.quick.BaseQuickAdapter;
import com.example.baserecyclerview.quick.BaseViewHolder;
import com.example.sofa_module.R;
import com.example.sofa_module.sofa.entity.BeanEntity;
;

public class ChildAdapter extends BaseQuickAdapter<BeanEntity, BaseViewHolder> {


    public ChildAdapter() {
        super(com.example.sofa_module.R.layout.item_sofa);
        addItemChildClick(R.id.item_video_likes_img);
    }

    @Override
    public void convert(BaseViewHolder holder, BeanEntity item) {
            //图片
                holder.setText(R.id.item_video_artist,item.author.name);
                holder.setText(R.id.item_video_feeds_content,item.feeds_text);
                holder.setText(R.id.item_video_type,item.activityText);
                if (item.topComment!=null){
                    holder.setText(R.id.item_video_likes_count,""+item.topComment.likeCount);
                }else {
//                    ImageView imageView = holder.getView(R.id.item_video_bigimg);
//                    imageView.setVisibility(View.GONE);
                }
                holder.setText(R.id.item_video_comment_count,""+item.ugc.commentCount);
                holder.setText(R.id.item_video_share_count,""+item.ugc.shareCount);
                holder.setText(R.id.item_video_likes_count,""+item.ugc.likeCount);
                holder.setImageyun(R.id.item_video_pic,item.author.avatar);
                holder.setImage(R.id.item_video_bigimg,item.cover);


    }
}
